#coding=utf-8
import time
from webscraper import get_species

ns = open('oujiang_fish.txt').read().split('\n')

for n in ns:
    n.strip()
    nl = n.split(',')
    if len(nl) == 1:
        a = nl[0]
        b = nl[0]
    else:
        a,b = nl
    
    s = get_species(a)
    if not s: 
        print b
    else:
        print s.order[1],'\t',s.family[1],'\t',b,'\t', s.latin_name  
    
    time.sleep(0.5)  
